#import <UIKit/UIKit.h>
#import <EventKit/EventKit.h>

#import "framework/FWPlugin.h"
#import "framework/FWApplicationDelegate.h"

#import "PIPlugin.h"


@interface PITaskPlugin : PIPlugin <FWApplicationDelegate>

@property (nonatomic, retain) NSArray* contexts;
@property (nonatomic, retain) NSString* contextsString;

@property (retain) EKEventStore* eventStore;
@property (assign, getter = isEventStoreUpdated) BOOL eventStoreUpdated;


// Object management
- (void)dealloc;

// Toolbar buttons
- (void)toggleMenuClicked:(UIBarButtonItem*)sender;
- (void)toggleDetailsClicked:(UIBarButtonItem*)sender;
- (void)disableContextsClicked:(UIBarButtonItem*)sender;
- (void)locationContextClicked:(UIBarButtonItem*)sender;
- (void)manualContextClicked:(UIBarButtonItem*)sender;
- (void)newTodoClicked:(UIBarButtonItem*)sender;

// Callback when badge updated
- (void)badgeUpdate:(NSNotification*)notif;

@end
